/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.gap.entities;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.Lob;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

/**
 *
 * @author Yunita
 */
@Entity
@Table(name = "gap_master_employee_education")
@XmlRootElement
//@NamedQueries({
//    @NamedQuery(name = "GapMasterEmployeeEducation.findAll", query = "SELECT g FROM GapMasterEmployeeEducation g"),
//    @NamedQuery(name = "GapMasterEmployeeEducation.findBySync", query = "SELECT g FROM GapMasterEmployeeEducation g WHERE g.sync = :sync"),
//    @NamedQuery(name = "GapMasterEmployeeEducation.findByEmployeeEducationId", query = "SELECT g FROM GapMasterEmployeeEducation g WHERE g.employeeEducationId = :employeeEducationId"),
//    @NamedQuery(name = "GapMasterEmployeeEducation.findByEmployeeEducationName", query = "SELECT g FROM GapMasterEmployeeEducation g WHERE g.employeeEducationName = :employeeEducationName"),
//    @NamedQuery(name = "GapMasterEmployeeEducation.findByEmployeeEducationUniversity", query = "SELECT g FROM GapMasterEmployeeEducation g WHERE g.employeeEducationUniversity = :employeeEducationUniversity"),
//    @NamedQuery(name = "GapMasterEmployeeEducation.findByEmployeeEducationYear", query = "SELECT g FROM GapMasterEmployeeEducation g WHERE g.employeeEducationYear = :employeeEducationYear"),
//    @NamedQuery(name = "GapMasterEmployeeEducation.findByEmployeeEducationTitleFirst", query = "SELECT g FROM GapMasterEmployeeEducation g WHERE g.employeeEducationTitleFirst = :employeeEducationTitleFirst"),
//    @NamedQuery(name = "GapMasterEmployeeEducation.findByEmployeeEducationTitleLast", query = "SELECT g FROM GapMasterEmployeeEducation g WHERE g.employeeEducationTitleLast = :employeeEducationTitleLast"),
//    @NamedQuery(name = "GapMasterEmployeeEducation.findByEmployeeEducationTimestamp", query = "SELECT g FROM GapMasterEmployeeEducation g WHERE g.employeeEducationTimestamp = :employeeEducationTimestamp")})
public class GapMasterEmployeeEducation implements Serializable {
    private static final long serialVersionUID = 1L;
    @Column(name = "sync")
    private String sync;
    @Id
    @Basic(optional = false)
    @Column(name = "employee_education_id")
    private Integer employeeEducationId;
    @Column(name = "employee_education_name")
    private String employeeEducationName;
    @Column(name = "employee_education_university")
    private String employeeEducationUniversity;
    @Column(name = "employee_education_year")
    private Integer employeeEducationYear;
    @Column(name = "employee_education_title_first")
    private String employeeEducationTitleFirst;
    @Column(name = "employee_education_title_last")
    private String employeeEducationTitleLast;
    @Lob
    @Column(name = "employee_education_description")
    private String employeeEducationDescription;
    @Column(name = "employee_education_timestamp")
    @Temporal(TemporalType.TIMESTAMP)
    private Date employeeEducationTimestamp;
    @JoinColumn(name = "employee_education_employee_id", referencedColumnName = "employee_id")
    @ManyToOne
    private GapMasterEmployee employeeEducationEmployeeId;
   
    public GapMasterEmployeeEducation() {
    }

    public GapMasterEmployeeEducation(Integer employeeEducationId) {
        this.employeeEducationId = employeeEducationId;
    }

    public String getSync() {
        return sync;
    }

    public void setSync(String sync) {
        this.sync = sync;
    }

    public Integer getEmployeeEducationId() {
        return employeeEducationId;
    }

    public void setEmployeeEducationId(Integer employeeEducationId) {
        this.employeeEducationId = employeeEducationId;
    }

    public String getEmployeeEducationName() {
        return employeeEducationName;
    }

    public void setEmployeeEducationName(String employeeEducationName) {
        this.employeeEducationName = employeeEducationName;
    }

    public String getEmployeeEducationUniversity() {
        return employeeEducationUniversity;
    }

    public void setEmployeeEducationUniversity(String employeeEducationUniversity) {
        this.employeeEducationUniversity = employeeEducationUniversity;
    }

    public Integer getEmployeeEducationYear() {
        return employeeEducationYear;
    }

    public void setEmployeeEducationYear(Integer employeeEducationYear) {
        this.employeeEducationYear = employeeEducationYear;
    }

    public String getEmployeeEducationTitleFirst() {
        return employeeEducationTitleFirst;
    }

    public void setEmployeeEducationTitleFirst(String employeeEducationTitleFirst) {
        this.employeeEducationTitleFirst = employeeEducationTitleFirst;
    }

    public String getEmployeeEducationTitleLast() {
        return employeeEducationTitleLast;
    }

    public void setEmployeeEducationTitleLast(String employeeEducationTitleLast) {
        this.employeeEducationTitleLast = employeeEducationTitleLast;
    }

    public String getEmployeeEducationDescription() {
        return employeeEducationDescription;
    }

    public void setEmployeeEducationDescription(String employeeEducationDescription) {
        this.employeeEducationDescription = employeeEducationDescription;
    }

    public Date getEmployeeEducationTimestamp() {
        return employeeEducationTimestamp;
    }

    public void setEmployeeEducationTimestamp(Date employeeEducationTimestamp) {
        this.employeeEducationTimestamp = employeeEducationTimestamp;
    }

    public GapMasterEmployee getEmployeeEducationEmployeeId() {
        return employeeEducationEmployeeId;
    }

    public void setEmployeeEducationEmployeeId(GapMasterEmployee employeeEducationEmployeeId) {
        this.employeeEducationEmployeeId = employeeEducationEmployeeId;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (employeeEducationId != null ? employeeEducationId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof GapMasterEmployeeEducation)) {
            return false;
        }
        GapMasterEmployeeEducation other = (GapMasterEmployeeEducation) object;
        if ((this.employeeEducationId == null && other.employeeEducationId != null) || (this.employeeEducationId != null && !this.employeeEducationId.equals(other.employeeEducationId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return employeeEducationName;
//        return "com.gap.entities.GapMasterEmployeeEducation[ employeeEducationId=" + employeeEducationId + " ]";
    }
    
}
